home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / whitelin / share / kndinsky / kndpslib.ps < prev   
Text File  |  1995-11-25  |  6KB  |  279 lines

  1. %%BeginProlog
  2. %%BeginProcSet: "KandinskY-builtin-GEM-prologue" "(0.0)" ""
  3. /KDdict 60 dict def
  4. KDdict begin
  5. /Reencsmalldict 12 dict def
  6. /ReEncodeSmall
  7. { Reencsmalldict begin
  8.   /newcodesandnames exch def
  9.   /newfontname exch def
  10.   /basefontname exch def
  11.   /basefontdict basefontname findfont def
  12.   /newfont basefontdict maxlength dict def
  13.   basefontdict
  14.    { exch dup /FID ne
  15.     { dup /Encoding eq
  16.      { exch dup length array copy newfont 3 1 roll put }
  17.      { exch newfont 3 1 roll put }
  18.      ifelse
  19.     }
  20.     { pop pop }
  21.     ifelse
  22.    } forall
  23.   newfont /FontName newfontname put
  24.   newcodesandnames aload pop
  25.   newcodesandnames length 2 idiv
  26.    { newfont /Encoding get 3 1 roll put }
  27.    repeat
  28.   newfontname newfont definefont pop
  29.   end
  30. } def
  31. /germvec [
  32. 8#201 /udieresis
  33. 8#204 /adieresis
  34. 8#216 /Adieresis
  35. 8#224 /odieresis
  36. 8#231 /Odieresis
  37. 8#232 /Udieresis
  38. 8#236 /germandbls
  39. ] def
  40.  
  41. %Prozeduren für Füllmuster aus dem Buch
  42. %"PostScript - Einführung und Leitfaden A", S. 229ff
  43. /SetUserScreenDict
  44.  22 dict def
  45. SetUserScreenDict begin
  46. /FindResolution
  47. { 72 0 matrix defaultmatrix
  48.   dtransform
  49.   /YRes exch def
  50.   /XRes exch def
  51.   XRes dup mul
  52.   YRes dup mul add sqrt
  53. } def
  54. end
  55.  
  56. /SetUserScreen
  57. { SetUserScreenDict begin
  58.   /Spotfunction exch def
  59.   /Screenangle exch def
  60.   /Cellsize exch def
  61.   gsave
  62.   Screenangle rotate
  63.   Cellsize dup scale
  64.   1 0 dtransform
  65.   grestore
  66.   /Y1 exch def
  67.   /X1 exch def
  68.   /Veclength X1 dup mul
  69.    Y1 dup mul add sqrt def
  70.  
  71.   /Frequency FindResolution
  72.    Veclength div def
  73.  
  74.   /NewScreenangle
  75.    Y1 X1 atan def
  76.  
  77.   Frequency NewScreenangle
  78.   /Spotfunction load
  79.   setscreen
  80.   end
  81. } def
  82.  
  83. /SetPatternDict 18 dict def
  84. SetPatternDict begin
  85. /BitIsOn
  86. { /YBit exch def
  87.   /XBit exch def
  88.   /Bytevalue Bstring
  89.    YBit Bwidth mul
  90.    XBit 8 idiv
  91.    add get def
  92.   /Mask 1 7 XBit 8 mod
  93.    sub bitshift def
  94.   Bytevalue Mask and 0 ne
  95. } def
  96. end
  97.  
  98. /BitpatternSpotfunction
  99. { SetPatternDict begin
  100.   /Y exch def
  101.   /X exch def
  102.   /XIndex X 1 add 2 div
  103.    BPSide mul cvi def
  104.   /YIndex Y 1 add 2 div
  105.    BPSide mul cvi def
  106.   XIndex YIndex BitIsOn
  107.   { /OnBits OnBits
  108.      1 add def 1 }
  109.   { /OffBits OffBits
  110.      1 add def 0 }
  111.   ifelse
  112.   end
  113. } def
  114.  
  115. /SetPattern
  116. { SetPatternDict begin
  117.   /Cellsz exch def
  118.   /Angle exch def
  119.   /Bwidth exch def
  120.   /BPSide exch def
  121.   /Bstring exch def
  122.   /OnBits 0 def
  123.   /OffBits 0 def
  124.   Cellsz Angle
  125.   /BitpatternSpotfunction load
  126.   SetUserScreen
  127.   {} settransfer
  128.   OffBits OffBits OnBits
  129.   add div setgray
  130.   end
  131. } def
  132.  
  133.  
  134. %Eingabe: string
  135. %Ausgabe: Unterstreichung
  136. /ul
  137. { dup stringwidth pop 0 gsave 0.4 setlinewidth
  138.    currentpoint newpath moveto 0 -2 padj rmoveto padj rlineto
  139.    closepath stroke grestore
  140. }def
  141.  
  142. %Eingabe: string
  143. %Gibt string als Outline aus
  144. /KDoshow
  145. { gsave currentpoint newpath moveto 0.2 setlinewidth false
  146.    charpath closepath stroke
  147. }def
  148.  
  149. %Eingabe: string breite wordspace? underline?
  150. %Gibt string ggf. unterstrichen ggf. in breite durch Dehnung der
  151. %Wortzwischenräume aus
  152. /KDwtextdict 5 dict def
  153. /KDwtext
  154. {
  155.   /str exch def /strwd exch def /nsp exch def /underl exch def
  156.   str stringwidth pop /pstrwd exch def
  157.   underl { gsave 0.4 setlinewidth currentpoint newpath
  158.   moveto 0 -2 padj rmoveto strwd 0 padj rlineto 
  159.   closepath stroke grestore } if
  160.  nsp 0 ne
  161.  { strwd pstrwd sub nsp div 0 8#040 str widthshow }
  162.  { str show } ifelse
  163. } bind def
  164.  
  165. %Eingabe: string breite underline?
  166. %Gibt string ggf. unterstrichen in breite durch Dehnung der
  167. %Buchstabenzwischenräume aus
  168. /KDatextdict 4 dict def
  169. /KDatext
  170. {
  171.   KDatextdict begin
  172.   /str exch def /strwd exch def /underl exch def
  173.   str stringwidth pop /pstrwd exch def
  174.   underl { gsave 0.4 setlinewidth currentpoint newpath
  175.   moveto 0 -2 padj rmoveto strwd 0 padj rlineto
  176.   closepath stroke grestore } if
  177.   strwd pstrwd sub str length dup 1 gt { 1 sub } if div 0 str ashow
  178.   end
  179. }def
  180.  
  181. %Eingabe: spitze(x,y) schwanz(x,y) laenge
  182. %Ausgabe: Pfeil
  183. /KDarrowdict 7 dict def
  184. /KDarrow
  185. { KDarrowdict begin
  186.     /leg exch def /taily exch def /tailx exch def
  187.     /tipy exch def /tipx exch def
  188.     gsave
  189.        1 setlinecap
  190.        newpath
  191.           tipx tipy translate
  192.           taily tipy sub /num exch def
  193.           tailx tipx sub /den exch def
  194.           num den eq den 0 eq and { /num 1 def } if
  195.           num den atan 16 sub rotate
  196.           leg 0 moveto 0 0 lineto
  197.           32 rotate
  198.           leg 0 lineto
  199.        closepath fill
  200.     grestore
  201.   end
  202. }bind def
  203.  
  204. %Eingabe: Markerhöhe
  205. %Ausgabe: Kreuz der Höhe Markerhöhe
  206. /KDmarkdict 2 dict def
  207. /KDmarkpoint
  208. { KDmarkdict begin
  209.   dup 2 div /h2 exch def /h exch def
  210.   moveto h2 h2 rmoveto h neg h neg rlineto 0 h rmoveto h h neg rlineto
  211.   stroke
  212.   end
  213. }def
  214.  
  215. /KDline{ newpath moveto lineto stroke }def
  216.  
  217. /KDpolydict 1 dict def
  218. /KDpoly
  219. { KDpolydict begin
  220.   /n exch def
  221.   moveto
  222.   2 1 n{ pop lineto }for
  223.   end
  224. }def
  225.  
  226. /KDboxdict 2 dict def
  227. /KDbox
  228. { KDboxdict begin
  229.   /h exch def /w exch def
  230.   moveto
  231.   w 0 rlineto
  232.   0 h rlineto
  233.   w neg 0 rlineto
  234.   closepath
  235.   end
  236. }def
  237.  
  238. /KDrboxdict 5 dict def
  239. /KDrbox
  240. { KDrboxdict begin
  241.   /r exch def /y2 exch def /x2 exch def
  242.   /y1 exch def /x1 exch def
  243.   x1 y2 r sub moveto
  244.   x1 y1 x2 y1 r arcto
  245.   x2 y1 x2 y2 r arcto
  246.   x2 y2 x1 y2 r arcto
  247.   x1 y2 x1 y1 r arcto
  248.   closepath
  249.   end
  250. }def
  251.  
  252. /KDarcdict 7 dict def
  253. /KDarc
  254. { KDarcdict begin
  255.   /ea exch def /ba exch def /ry exch def /rx exch def
  256.   /y exch def /x exch def
  257.   /savematrix matrix currentmatrix def
  258.   x y translate
  259.   rx ry neg scale
  260.   0 0 1 ba ea arc
  261.   savematrix setmatrix
  262.   end
  263. }def
  264.  
  265. /KDpatscale 1 def
  266. /KDpatmul{ KDpatscale mul }def
  267.  
  268. /KDpoint{ 72 div 254 mul }def
  269. /KDmm{ 254 div 72 mul }def
  270.  
  271. /KDcharheight 12 KDmm def
  272.  
  273. end
  274. %%EndProcSet
  275. %%EndProlog
  276. %%Page: 1 1
  277. KDdict begin
  278.  
  279.